Deploying operators of a streaming application based on physical location attributes of a virtual machine

ABSTRACT

A streams manager monitors operator performance of a streaming application to determine when the performance of an operator needs to be improved or optimized. The streams manager in conjunction with a cloud manager automatically determines one or more preferred virtual machines in a cloud with a specified streams infrastructure that best meet the needs of the underperforming operator or application component based on physical location attributes of the preferred virtual machines. The cloud manager determines the physical location attributes of the candidate virtual machines. The streams manager or the cloud manager can then determine a preferred virtual machine of the candidates to deploy the operator based on the physical location attributes. The streams manager then modifies the flow graph so one or more operators of the streaming application are deployed to a preferred virtual machine determined according to the physical location attributes of the preferred virtual machine.

BACKGROUND

1. Technical Field

This disclosure generally relates to streaming applications, and morespecifically relates enhancing performance of a steaming application bymigrating or deploying operators of the streaming application to virtualmachines according to physical location attributes of a virtual machine.

2. Background Art

Streaming applications are known in the art, and typically includemultiple operators coupled together in a flow graph that processstreaming data in near real-time. An operator typically takes instreaming data in the form of data tuples, operates on the tuples insome fashion, and outputs the processed tuples to the next operator.Streaming applications are becoming more common due to the highperformance that can be achieved from near real-time processing ofstreaming data.

Many streaming applications require significant computer resources, suchas processors and memory, to provide the desired near real-timeprocessing of data. However, the workload of a streaming application canvary greatly over time. Allocating on a permanent basis computerresources to a streaming application that would assure the streamingapplication would always function as desired (i.e., during peak demand)would mean many of those resources would sit idle when the streamingapplication is processing a workload significantly less than itsmaximum. Furthermore, what constitutes peak demand at one point in timecan be exceeded as the usage of the streaming application increases. Fora dedicated system that runs a streaming application, an increase indemand may require a corresponding increase in hardware resources tomeet that demand.

BRIEF SUMMARY

A streams manager monitors operator performance of a streamingapplication to determine when the performance of an operator needs to beimproved or optimized. The streams manager in conjunction with a cloudmanager automatically determines one or more preferred virtual machines(VMs) in a cloud with a specified streams infrastructure that best meetthe needs of the underperforming operator or application component basedon physical location attributes of the preferred virtual machines. Thecloud manager determines the physical location attributes of thecandidate virtual machines. The streams manager or the cloud manager canthen make the determination of a preferred virtual machine of thecandidates to deploy the operator based on the physical locationattributes. The streams manager then modifies the flow graph so one ormore operators of the streaming application are deployed to a preferredvirtual machine determined according to the physical location attributesof the preferred virtual machine.

The foregoing and other features and advantages will be apparent fromthe following more particular description, as illustrated in theaccompanying drawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING(S)

The disclosure will be described in conjunction with the appendeddrawings, where like designations denote like elements, and:

FIG. 1 is a block diagram of a cloud computing node;

FIG. 2 is a block diagram of a cloud computing environment;

FIG. 3 is a block diagram of abstraction model layers;

FIG. 4 is a block diagram showing some features of a cloud manager;

FIG. 5 is a block diagram showing some features of a streams manager;

FIG. 6 is a flow diagram of a method for a streams manager to requestand receive from a cloud manager virtual machines to improve performanceof a streaming application;

FIG. 7 is a flow diagram of a specific method in accordance with method600 in FIG. 6 for a streams manager to request and receive from a cloudmanager virtual machines to improve performance of a streamingapplication;

FIG. 8 is a block diagram of one specific example of a streamingapplication;

FIG. 9 is a block diagram showing the streaming application in FIG. 8after the addition of two virtual machines provisioned from a cloud;

FIG. 10 is a list of examples of physical location attributes used bythe cloud manager to determine a physical location to provision virtualmachines for a streaming application;

FIG. 11 is a block diagram that represents an example of a physicallocation attributes table;

FIG. 12 is a flow diagram of a specific method for deploying an operatorto a VM based on physical location attributes determined by a cloudmanager;

FIG. 13 is a block diagram showing the streaming application in FIG. 8after the relocation of operators to virtual machines provisioned from acloud based on physical location attributes; and

FIG. 14 is a flow diagram of another specific method for deploying anoperator to a VM based on physical location attributes determined by acloud manager.

DETAILED DESCRIPTION

The disclosure and claims herein relate to a streams manager thatmonitors operator performance of a streaming application to determinewhen the performance of an operator needs to be improved or optimized.The streams manager in conjunction with a cloud manager automaticallydetermines one or more preferred virtual machines in a cloud with aspecified streams infrastructure that best meet the needs of theunderperforming operator or application component based on physicallocation attributes of the preferred virtual machines. The cloud managerdetermines the physical location attributes of the candidate virtualmachines. In the described examples, the streams manager or the cloudmanager then makes the determination of a preferred VM of the candidatesto deploy the operator based on the physical location attributes. Thestreams manager then modifies the flow graph so one or more operators ofthe streaming application are deployed to a preferred virtual machinedetermined according to the physical location attributes of thepreferred virtual machine.

It is understood in advance that although this disclosure includes adetailed description on cloud computing, implementation of the teachingsrecited herein are not limited to a cloud computing environment. Rather,embodiments of the present invention are capable of being implemented inconjunction with any other type of computing environment now known orlater developed.

Cloud computing is a model of service delivery for enabling convenient,on-demand network access to a shared pool of configurable computingresources (e.g., networks, network bandwidth, servers, processing,memory, storage, applications, virtual machines, and services) that canbe rapidly provisioned and released with minimal management effort orinteraction with a provider of the service. This cloud model may includeat least five characteristics, at least three service models, and atleast four deployment models.

Characteristics are as follows:

On-demand self-service: a cloud consumer can unilaterally provisioncomputing capabilities, such as server time and network storage, asneeded automatically without requiring human interaction with theservice's provider.

Broad network access: capabilities are available over a network andaccessed through standard mechanisms that promote use by heterogeneousthin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

Resource pooling: the provider's computing resources are pooled to servemultiple consumers using a multi-tenant model, with different physicaland virtual resources dynamically assigned and reassigned according todemand. There is a sense of location independence in that the consumergenerally has no control or knowledge over the exact location of theprovided resources but may be able to specify location at a higher levelof abstraction (e.g., country, state, or datacenter).

Rapid elasticity: capabilities can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly released to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported providing transparency for both theprovider and consumer of the utilized service.

Service Models are as follows:

Software as a Service (SaaS): the capability provided to the consumer isto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client devices through athin client interface such as a web browser (e.g., web-based e-mail).The consumer does not manage or control the underlying cloudinfrastructure including network, servers, operating systems, storage,or even individual application capabilities, with the possible exceptionof limited user-specific application configuration settings.

Platform as a Service (PaaS): the capability provided to the consumer isto deploy onto the cloud infrastructure consumer-created or acquiredapplications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications and possiblyapplication hosting environment configurations.

Infrastructure as a Service (IaaS): the capability provided to theconsumer is to provision processing, storage, networks, and otherfundamental computing resources where the consumer is able to deploy andrun arbitrary software, which can include operating systems andapplications. The consumer does not manage or control the underlyingcloud infrastructure but has control over operating systems, storage,deployed applications, and possibly limited control of select networkingcomponents (e.g., host firewalls).

Deployment Models are as follows:

Private cloud: the cloud infrastructure is operated solely for anorganization. It may be managed by the organization or a third party andmay exist on-premises or off-premises.

Community cloud: the cloud infrastructure is shared by severalorganizations and supports a specific community that has shared concerns(e.g., mission, security requirements, policy, and complianceconsiderations). It may be managed by the organizations or a third partyand may exist on-premises or off-premises.

Public cloud: the cloud infrastructure is made available to the generalpublic or a large industry group and is owned by an organization sellingcloud services.

Hybrid cloud: the cloud infrastructure is a composition of two or moreclouds (private, community, or public) that remain unique entities butare bound together by standardized or proprietary technology thatenables data and application portability (e.g., cloud bursting forloadbalancing between clouds).

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure comprising anetwork of interconnected nodes.

Referring now to FIG. 1, a block diagram of an example of a cloudcomputing node is shown. Cloud computing node 100 is only one example ofa suitable cloud computing node and is not intended to suggest anylimitation as to the scope of use or functionality of embodiments of theinvention described herein. Regardless, cloud computing node 100 iscapable of being implemented and/or performing any of the functionalityset forth hereinabove.

In cloud computing node 100 there is a computer system/server 110, whichis operational with numerous other general purpose or special purposecomputing system environments or configurations. Examples of well-knowncomputing systems, environments, and/or configurations that may besuitable for use with computer system/server 110 include, but are notlimited to, personal computer systems, server computer systems, tabletcomputer systems, thin clients, thick clients, handheld or laptopdevices, multiprocessor systems, microprocessor-based systems, set topboxes, programmable consumer electronics, network PCs, minicomputersystems, mainframe computer systems, and distributed cloud computingenvironments that include any of the above systems or devices, and thelike.

Computer system/server 110 may be described in the general context ofcomputer system executable instructions, such as program modules, beingexecuted by a computer system. Generally, program modules may includeroutines, programs, objects, components, logic, data structures, and soon that perform particular tasks or implement particular abstract datatypes. Computer system/server 110 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage devices.

As shown in FIG. 1, computer system/server 110 in cloud computing node100 is shown in the form of a general-purpose computing device. Thecomponents of computer system/server 110 may include, but are notlimited to, one or more processors or processing units 120, a systemmemory 130, and a bus 122 that couples various system componentsincluding system memory 130 to processing unit 120.

Bus 122 represents one or more of any of several types of busstructures, including a memory bus or memory controller, a peripheralbus, an accelerated graphics port, and a processor or local bus usingany of a variety of bus architectures. By way of example, and notlimitation, such architectures include Industry Standard Architecture(ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA)bus, Video Electronics Standards Association (VESA) local bus, andPeripheral Component Interconnect (PCI) bus.

Computer system/server 110 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 110, and it includes both volatileand non-volatile media, removable and non-removable media. An example ofremovable media is shown in FIG. 1 to include a Digital Video Disc (DVD)192.

System memory 130 can include computer system readable media in the formof volatile or non-volatile memory, such as firmware 132. Firmware 132provides an interface to the hardware of computer system/server 110.System memory 130 can also include computer system readable media in theform of volatile memory, such as random access memory (RAM) 134 and/orcache memory 136. Computer system/server 110 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 140 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 122 by one or more datamedia interfaces. As will be further depicted and described below,memory 130 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions described in more detail below.

Program/utility 150, having a set (at least one) of program modules 152,may be stored in memory 130 by way of example, and not limitation, aswell as an operating system, one or more application programs, otherprogram modules, and program data. Each of the operating system, one ormore application programs, other program modules, and program data orsome combination thereof, may include an implementation of a networkingenvironment. Program modules 152 generally carry out the functionsand/or methodologies of embodiments of the invention as describedherein.

Computer system/server 110 may also communicate with one or moreexternal devices 190 such as a keyboard, a pointing device, a display180, a disk drive, etc.; one or more devices that enable a user tointeract with computer system/server 110; and/or any devices (e.g.,network card, modem, etc.) that enable computer system/server 110 tocommunicate with one or more other computing devices. Such communicationcan occur via Input/Output (I/O) interfaces 170. Still yet, computersystem/server 110 can communicate with one or more networks such as alocal area network (LAN), a general wide area network (WAN), and/or apublic network (e.g., the Internet) via network adapter 160. Asdepicted, network adapter 160 communicates with the other components ofcomputer system/server 110 via bus 122. It should be understood thatalthough not shown, other hardware and/or software components could beused in conjunction with computer system/server 110. Examples, include,but are not limited to: microcode, device drivers, redundant processingunits, external disk drive arrays, Redundant Array of Independent Disk(RAID) systems, tape drives, data archival storage systems, etc.

Referring now to FIG. 2, illustrative cloud computing environment 200 isdepicted. As shown, cloud computing environment 200 comprises one ormore cloud computing nodes 100 with which local computing devices usedby cloud consumers, such as, for example, personal digital assistant(PDA) or cellular telephone 210A, desktop computer 210B, laptop computer210C, and/or automobile computer system 210N may communicate. Nodes 100may communicate with one another. They may be grouped (not shown)physically or virtually, in one or more networks, such as Private,Community, Public, or Hybrid clouds as described hereinabove, or acombination thereof. This allows cloud computing environment 200 tooffer infrastructure, platforms and/or software as services for which acloud consumer does not need to maintain resources on a local computingdevice. It is understood that the types of computing devices 210A-Nshown in FIG. 2 are intended to be illustrative only and that computingnodes 100 and cloud computing environment 200 can communicate with anytype of computerized device over any type of network and/or networkaddressable connection (e.g., using a web browser).

Referring now to FIG. 3, a set of functional abstraction layers providedby cloud computing environment 200 in FIG. 2 is shown. It should beunderstood in advance that the components, layers, and functions shownin FIG. 3 are intended to be illustrative only and the disclosure andclaims are not limited thereto. As depicted, the following layers andcorresponding functions are provided.

Hardware and software layer 310 includes hardware and softwarecomponents. Examples of hardware components include mainframes, in oneexample IBM System z systems; RISC (Reduced Instruction Set Computer)architecture based servers, in one example IBM System p systems; IBMSystem x systems; IBM BladeCenter systems; storage devices; networks andnetworking components. Examples of software components include networkapplication server software, in one example IBM WebSphere® applicationserver software; and database software, in one example IBM DB2® databasesoftware. IBM, System z, System p, System x, BladeCenter, WebSphere, andDB2 are trademarks of International Business Machines Corporationregistered in many jurisdictions worldwide.

Virtualization layer 320 provides an abstraction layer from which thefollowing examples of virtual entities may be provided: virtual servers;virtual storage; virtual networks, including virtual private networks;virtual applications and operating systems; and virtual clients.

In one example, management layer 330 may provide the functions describedbelow. Resource provisioning provides dynamic procurement of computingresources and other resources that are utilized to perform tasks withinthe cloud computing environment. Metering and Pricing provide costtracking as resources are utilized within the cloud computingenvironment, and billing or invoicing for consumption of theseresources. In one example, these resources may comprise applicationsoftware licenses. Security provides identity verification for cloudconsumers and tasks, as well as protection for data and other resources.User portal provides access to the cloud computing environment forconsumers and system administrators. Service level management providescloud computing resource allocation and management such that requiredservice levels are met. Service Level Agreement (SLA) planning andfulfillment provide pre-arrangement for, and procurement of, cloudcomputing resources for which a future requirement is anticipated inaccordance with an SLA. A cloud manager 350 is representative of a cloudmanager as described in more detail below. While the cloud manager 350is shown in FIG. 3 to reside in the management layer 330, cloud manager350 can span all of the levels shown in FIG. 3, as discussed in detailbelow.

Workloads layer 340 provides examples of functionality for which thecloud computing environment may be utilized. Examples of workloads andfunctions which may be provided from this layer include: mapping andnavigation; software development and lifecycle management; virtualclassroom education delivery; data analytics processing; transactionprocessing; and a streams manager 360, as discussed in more detailbelow.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

FIG. 4 shows one suitable example of the cloud manager 350 shown in FIG.3. The cloud manager 350 includes a cloud provisioning mechanism 410that includes a resource request interface 420. The resource requestinterface 420 allows a software entity, such as the streams manager 360,to request virtual machines from the cloud manager 350 without humanintervention. The cloud manager 350 also includes a user interface 430that allows a user to interact with the cloud manager to perform anysuitable function, including provisioning of VMs, destruction of VMs,performance analysis of the cloud, etc. The difference between theresource request interface 420 and the user interface 430 is a user mustmanually use the user interface 430 to perform functions specified bythe user, while the resource request interface 420 may be used by asoftware entity to request provisioning of cloud resources by the cloudmechanism 350 without input from a human user. The cloud manager 350also includes physical location attributes of VMs 440 located at variousphysical locations in the cloud as described further below. Of course,cloud manager 350 could include many other features and functions knownin the art that are not shown in FIG. 4.

FIG. 5 shows one suitable example of the streams manager 360 shown inFIG. 3. The streams manager 360 is software that manages one or morestreaming applications, including creating operators and data flowconnections between operators in a flow graph that represents astreaming application. The streams manager 360 includes a performancemonitor 510 with one or more performance thresholds 520. Performancethresholds 520 can include static thresholds, such as percentage used ofcurrent capacity or tuple rate, and can also include any suitableheuristic for measuring performance of a streaming application as awhole or for measuring performance of one or more operators in astreaming application. Performance thresholds 520 may include differentthresholds and metrics at the operator level, at the level of a group ofoperators, and/or at the level of the overall performance of thestreaming application. The stream performance monitor 510 monitorsperformance of a streaming application, and when current performancecompared to the one or more performance thresholds 520 indicates currentperformance needs to be improved, the stream performance monitor 510communicates the need for resources to the cloud resource requestmechanism 530. The cloud resource request mechanism 530, in response tothe communication from the stream performance monitor, assembles a cloudresource request 530, which can include information such as a number ofVMs to provision 550, stream infrastructure needed in each VM 560, astream application portion 570 for each VM, and a location restriction580. The location restriction 580 give input for the cloud manger todetermine a preferred candidate VM based on physical locationattributes. Once the cloud resource request 530 is formulated, thestreams manager 360 submits the cloud resource request 530 to a cloudmanager, such as cloud manager 350 shown in FIGS. 3 and 4.

The cloud resource request can be formatted in any suitable way. Asimple example will illustrate two suitable ways for formatting a cloudresource request. Let's assume the streams manager determines it needstwo VMs, where both have common stream infrastructure, with a first ofthe VMs hosting operator A and the second of the VMs hosting operator B.The cloud resource request 540 in FIG. 5 could specify two VMs at 550,could specify the common stream infrastructure, such as an operatingsystem and middleware, at 560, and could specify operator A and operatorB at 570. In response, the cloud manager would provision two VMs withthe common stream infrastructure, with the first of the VMs hostingoperator A and the second of the VMs hosting operator B. In thealternative, the cloud resource request 540 could be formulated suchthat each VM is specified with its corresponding stream infrastructureand stream application portion. In this configuration, the cloudresource request would specify a first VM with the common streaminfrastructure and operator A, and a second VM with the common streaminfrastructure and operator B.

Referring to FIG. 6, a method 600 shows one suitable example forenhancing performance of a streaming application, and is preferablyperformed by the streams manager 360 interacting with the cloud manager350. The streams manager requests resources, such a VMs, from the cloudmanager (step 610). The cloud manager provisions the VMs (step 620). Thestreams manager then deploys a portion of the flow graph to the VMs(step 630). When the streaming application is not initially hosted inthe cloud, the result will be a hybrid implementation of the streamsapplication, with some portions hosted on a dedicated computer systemand other portions hosted by one or more VMs in the cloud.

FIG. 7 shows one suitable example of a more specific method 700 forenhancing performance of a streaming application. Note that method 700could be one specific implementation for method 600 shown in FIG. 6. Thestreams manager requests a specified number of VMs from the cloudmanager with specified streams infrastructure and one or more specifiedstreams application components (step 710). The term “streamsinfrastructure” as used herein includes any software that is needed torun a component in the streaming application, such as an operatingsystem and middleware that supports executing components in a streamingapplication. The term “streams application component” can include anycomponent in a streaming application, including operators. The cloudmanager provisions the VMs with the specified streams infrastructure andthe one or more specified streams application components in response tothe request from the streams manager (step 720). The streams managerincludes the VMs in the set of hosts available to the streamingapplication (step 730). The streams manager then modifies the flow graphso one or more portions of the flow graph are hosted by the one or moreVMs provisioned by the cloud manager (step 740).

A simple example is provided in FIGS. 8 and 9 to illustrate the conceptsdiscussed above. Referring to FIG. 8, a streaming application 800includes operators A, B, C, D, E, F, G, H, I and J as shown. Operator Aoriginates a stream of tuples, which is processed by operator B, whichoutputs tuples. The tuples from operator B are processed by operator C,which outputs tuples to operator D, which processes the tuples andoutputs its tuples to operator H. In similar fashion, operator Eoriginates a stream of tuples, which is processed by operator F, whichoutputs tuples that are processed by operator G, which outputs tuples tooperator H. Note that operator H receives tuples from both operator Dand operator G. Operator H processes the tuples it receives fromoperator D and from operator G, and outputs its tuples to operators Iand J. We assume for this example the streaming application 800 runs ona dedicated system, such as a computer system/server 100 shown in FIG.1.

The stream performance monitor 510 in FIG. 5 monitors performance of thestreaming application 800 in FIG. 8 in accordance with one or moredefined performance thresholds 520. An example of a suitable performancethreshold 520 is percent of capacity used. A performance threshold ofsay, 80% could be specified for operator F in FIG. 8. Note a performancethreshold can apply to a specified operator, to a specified a group ofoperators, or to all operators in the streaming application. We assumethe streaming application 800 runs with operator F operating at lessthan 80% capacity, but due to increased demand, the performance ofoperator F grows to exceed 80% capacity. In response to the performanceof operator F exceeding the 80% defined performance threshold, thestreams manager requests cloud resources to relieve the load on operatorF. For example, the streams manager could request the cloud managerprovision two VMs with streams infrastructure that supports runningcomponents of the streaming application and with the logic for operatorF (step 710 in FIG. 7). In response, the cloud manager provisions twoVMs with the specified stream infrastructure and with the logic foroperator F (step 720). The streams manager includes the two VMs in theset of hosts available to the streaming application (step 730). Thestreams manager then modifies the flow graph so one or more portions arehosted by the two VMs just provisioned (step 740). The modifications tothe flow graph are shown in the streaming application 900 in FIG. 9 toinclude a new operator K and new operators L and M that implement thefunctions of operator F in two different virtual machines and that workin parallel with operator F. Note the new operator K is needed to splitthe tuples coming from operator E into three sets that are distributedto operators L, F, and M. Note that operators L and M are hosted on thevirtual machines in the cloud provisioned by the cloud manager, asindicated by the VM in these operators, while operator F is hosted by adedicated computer system that runs the rest of the streamingapplication 900 shown in FIG. 9. The result is a hybrid system, withsome operators in the streaming application 900 hosted on the dedicatedcomputer system, with other operators, such as operators L and M, hostedin the cloud.

While the simple example in FIGS. 8 and 9 show two new operators L and Mthat implement the function of operator F, this is not to be construedas limiting of the concepts herein. Any suitable number of operatorscould be deployed in a single VM. For example, if performance ofoperators B, C and D all exceed one or more of the defined performancethresholds, a single VM could be provisioned with the logic for all ofoperators B, C and D. In addition, a VM could be provisioned toimplement two different unrelated operators. For example, if operators Cand F all exceed one or more of the defined performance thresholds, asingle VM could be provisioned that implements both operator C andoperator F. The disclosure and claims herein expressly extend to anynumber of virtual machines that implement any suitable number ofoperators.

As described herein, physical location attributes can be used todetermine a preferred virtual machine to deploy operators of a streamingapplication to optimize the streaming application. When the performanceof an operator needs to be improved or optimized, the streams manager inconjunction with a cloud manager may automatically determine one or morepreferred virtual machines in a cloud with a specified streamsinfrastructure to best meet the needs of the underperforming operator orapplication component based on physical location attributes of candidatethe virtual machines. A location for placement of an operator is chosenbased on the physical attributes of the physical location. Operators aredynamically migrated to the VM that best meets the needs of the operatorto improve performance of the application.

FIG. 10 shows a list 1000 of suitable examples of location attributes440 shown in FIG. 3. The location attributes 440 may be collected andstored by the cloud manager 350. The suitable physical attributes mayinclude the climate for the physical location of the resource such as“cold”, “hot” or “mild”. The suitable physical attributes may alsoinclude an average cooling cost or a current cooling cost for thelocation. The suitable physical attributes may relate to the dataregulation environment of the physical location. The data regulationenvironment refers to political, legal or security restrictions relatedto the physical location. The suitable physical attributes may alsoinclude performance attributes such as processing performance,input/output (I/O) performance, and reliability performance. Otherphysical attribute include security of the VM location and peak demand.

FIG. 11 shows an example of a physical location attributes table 1110.The physical location attributes table 1110 represents an example of thephysical location attributes in the list of FIG. 10 that could be storedas physical location attributes 440 shown in FIG. 4. It is understoodthat the physical location attributes 440 could be stored using avariety of storage methods and structures in addition to the exampleshown in FIG. 11. In this example, each physical location attributeincludes a VM location ID 1112 and one or more fixed attributes 1114 anddynamic attributes 1116. The fixed attributes 1114 are attributesrelated to the general physical location, and the dynamic attributes1116 are related to a current attribute of the physical location or astatus of a fixed attribute. For example, a first physical locationattribute record 1118 has a location ID of VMID1. As shown in thephysical location attributes table 1110, the location ID VMID1corresponds to a fixed attribute of “Cold Climate” and a dynamicattribute of “Current Cost” which indicates the current cooling cost ofthe physical location corresponding to the physical location ID.Similarly, in the physical location attributes table 1110, the fourthattributes record 1120 has a location ID VMID4 with a fixed attribute of“High I/O Performance” and a dynamic attribute of “Available”, whichindicates the resources with the high I/O performance are currentlyavailable.

Again referring to FIG. 11, the physical location attributes table 1110may also include a security attribute as shown in the example attributerecord 1122. The security attribute indicates a security parameter forthe physical location hosting the corresponding virtual machine. Forexample, the security attribute may indicate a high level of securityfor the physical location hosting the virtual machine, or may indicate aspecific type of security encryption being used or available to be usedat the physical location. A corresponding dynamic attribute for a fixedsecurity attribute may indicate the availability of the securityresource as shown in the example attribute record 1122. Similarly, thephysical location attributes table 1110 may also include a peak demandattribute. The peak demand attribute may indicate a peak demandparameter for the physical location hosting the corresponding virtualmachine. For example, the peak demand attribute in attribute record 1124may be associated with a physical location that has a large peakprocessing capability that is not always utilized. For example, thephysical resources with the peak demand attribute may be located on theother side of the world that has a low utilization at night. The streamsmanager or cloud manager can select to deploy an operator to thisvirtual machine at night (night time for the physical location hostingthe VM) during times of low utilization. The corresponding dynamicattribute may indicate the physical location has a current lowutilization as shown in the example attribute record 1124.

The physical location attributes described with reference to FIG. 11 canbe used in conjunction with the location restriction 580 shown in FIG.5. For example, when the streams manager determines an operator of thestreams application that is underperforming it can request resourcesfrom the cloud manager while including a location restriction 580 in thecloud resource request 540 (FIG. 5). The cloud manager can thendetermine a preferred VM in the cloud for deploying the underperformingoperator based on physical location attributes and the locationrestriction 580. The location restriction 580 provides input for thecloud manger to determine a preferred VM based on physical locationattributes. Location restrictions are therefore the same as or relatedto one or more of the physical location attributes in FIG. 10. Forexample, if the operator were computationally demanding, the locationrestriction could be set by the streams manager to include a coolingcost restriction. This would instruct the cloud manager to select aphysical location for the VM with a physical location attribute with alow current cooling cost. Similarly, a location restriction thatindicates an operator processes politically sensitive data that must beperformed in a specific political environment would instruct the cloudmanager to select a VM with a physical location attribute that indicatesthe location meets the location restriction for the specific nature ofthe sensitive data processed by the operator.

FIG. 12 shows a first example of a specific method 1200 for enhancingperformance of a streaming application by modifying the flow graph soone or more operators of the streaming application are deployed to apreferred virtual machine based on physical location attributes of thepreferred virtual machine. In this example, the cloud manger makes thedetermination of which VM to use to deploy the operator. Note thatmethod 1200 could be one specific implementation for method 600 shown inFIG. 6. The steps of method 1200 are preferably performed by the streamsmanager 360 interacting with the cloud manager 350 described above. Thestreams manager monitors operator performance of a streams application(step 1210). The streams manager determines an operator of the streamsapplication that is underperforming (step 1220). The streams managerrequests resources from a cloud manager (step 1230). Note the requestcan optionally include a location restriction. The cloud managerdetermines physical location attributes of candidate VMs in a cloud(step 1240). The cloud manager determines a preferred VM in the cloud ofthe candidate VMs for deploying the underperforming operator based onphysical location attributes (step 1250). The cloud manager provisionsthe preferred VM in the cloud (step 1260). The streams manager modifiesthe flow graph to deploy the underperforming operator in theprovisioned, preferred VM (step 1210). The method is then done.

Another simple example is provided in FIG. 13 to illustrate the conceptsdiscussed above. This example also begins with the stream performancemonitor 510 in FIG. 5 monitoring performance of the streamingapplication 800 in FIG. 8 in accordance with one or more definedperformance thresholds 520. In response to the performance of operator Fexceeding a defined performance threshold, the streams manager requestscloud resources to relieve the load on operator F. In this example, weassume that the streams manager includes a location restriction 580(FIG. 5) and requests the cloud manager to provision one or more VMswith streams infrastructure that supports running components of thestreaming application and with the logic for operator F (step 1230 inFIG. 12). In response, the cloud manager determines physical locationattributes of candidate VMs in the cloud and determines a preferredcandidate for deploying operator F based on the physical locationattributes and the location restriction (steps 1240 and 1250 in FIG.12). The cloud manager then provisions a VM with the specified streaminfrastructure and with the logic for operator F in the candidate VM(step 1260 in FIG. 12). The streams manager includes the new VM in theset of hosts available to the streaming application and modifies theflow graph so one or more portions of operator F are hosted by the newVM just provisioned (step 1270). The modifications to the flow graph areshown in the streaming application 1300 in FIG. 13 to include a newoperator L in the new physical location Y 1310. The new operator K isused to split the tuples coming from operator E into two sets that aredistributed to operators L and F as described in the previous example.

FIG. 13 further illustrates another example for enhancing performance ofa streaming application by migrating or deploying operators of thestreaming application to virtual machines according to attributes of thephysical location. In this example, instead of moving a portion of anoperator to a new VM, the entire operator is relocated. In this examplewe assume the stream performance monitor 510 in FIG. 5 in monitoringperformance of the streaming application 800 in FIG determined thatoperator B was underperforming. In response to a request as describedabove, the cloud manager determines physical location attributes ofcandidate VM in the cloud and determines a preferred candidate fordeploying operator B at physical location Z 1320 based on the physicallocation attributes and the location restriction (steps 1240 and 1250 inFIG. 12). The streams manager modifies the flow graph so operator B ishosted by the new VM just provisioned (step 1270) in the new physicallocation Z 1320.

In another example, the streams manager makes the determination of towhich VM to deploy the operator to optimize the performance of the cloudapplication. This is in contrast to the above example where the cloudmanager made the determination of the VM. In this example, thecommunication between the streams manager and the cloud manager isdifferent than the examples described above. The streams managermonitors operator performance of a streams application and determines anoperator of the streams application that is underperforming or can beoptimized as described above. In addition, the cloud manager determinesphysical location attributes of VMs in a cloud also in the mannerdescribed above. In contrast, in this example the information concerningthe physical location attributes is communicated back to the streamsmanager and the streams manager then determines a preferred VM in thecloud for deploying the underperforming operator based on physicallocation attributes. The streams manager may also consider whether apreferred VM is already available with the needed physical locationattributes. The streams manager then determines if the preferred VM isnot already available then the streams manager requests the cloudmanager to provision the preferred VM. Provisioning the preferred VMcould include provisioning a new VM or resizing an existing VM for thepreferred VM. The request by the streams manager for a new VM or resizeVM to the cloud manager may be similar to the request described above.If the preferred VM is already available to the streams manager or afterthe preferred VM is provisioned by the cloud manager, the streamsmanager modifies the flow graph to deploy the underperforming operatorin the preferred VM. After the streams manager modifies the flow graph,the streams manager then sends a notification to the cloud manager thatthe flow graph has been modified. With this notification, the cloudmanager is able to compensate for load balancing changes due to thechanges in the flow graph.

FIG. 14 shows another suitable example of a specific method 1400 forenhancing performance of a streaming application. Method 1400illustrates the example described above where the streams manager makesthe determination of which VM to deploy the operator to optimize theperformance of the cloud application. The steps of method 1400 arepreferably performed by the streams manager 360 and the cloud manager350 described above. The streams manager monitors operator performanceof a streams application (step 1410). The streams manager determines anoperator of the streams application that is underperforming relative toother operators or can be optimized (step 1420). The cloud managerdetermines physical location attributes of VMs in a cloud (step 1430)and communicates those physical location attributes to the streamsmanager. The streams manager determines a preferred VM in the cloud fordeploying the underperforming operator based on physical locationattributes (step 1440). The streams manager then determines if thepreferred VM is already available (step 1450). If the preferred VM isnot already available (step 1450=no) then the streams manager requeststhe cloud manager to provision or resize the preferred VMs in the cloud(step 1260) and the method continues with step 1470. If the preferred VMis already available (step 1450=yes) then the method continues with step1470. The streams manager modifies the flow graph to deploy theunderperforming operator in the preferred candidate VM (step 1470). Thestreams manager then sends a notification to the cloud manager that theflow graph has been modified to make the cloud manager aware of thechange for load balancing (step 1480). The method is then done.

The disclosure and claims herein relate to a streams manager thatmonitors performance of a streaming application, and when theperformance of an operator needs to be improved or optimized, thestreams manager in conjunction with a cloud manager automaticallydetermine one or more preferred virtual machines in a cloud with aspecified streams infrastructure to best meet the needs of theunderperforming operator or application component based on physicallocation attributes of candidate the virtual machines. The streamsmanager can then modify the flow graph so one or more operators of thestreaming application are deployed to a preferred virtual machinedetermined according to the physical location attributes of thepreferred virtual machine to optimize the application executing in thecloud.

One skilled in the art will appreciate that many variations are possiblewithin the scope of the claims. Thus, while the disclosure isparticularly shown and described above, it will be understood by thoseskilled in the art that these and other changes in form and details maybe made therein without departing from the spirit and scope of theclaims. For example, the cloud described herein could be a multi-cloudenvironment where the cloud manager is a multi-cloud manager such thatthe VMs provided to the streams manager are located on different clouds.

The invention claimed is:
 1. An apparatus comprising: at least oneprocessor; a memory coupled to the at least one processor; a streamingapplication residing in the memory and executed by the at least oneprocessor, the streaming application comprising a flow graph thatincludes a plurality of operators that process a plurality of datatuples; a streams manager residing in the memory and executed by the atleast one processor, the streams manager monitoring performance of thestreaming application, and when the streams manager determines anunder-performing operator of the streaming application can be optimizedsending a request to a cloud manager to provision at least one virtualmachine, wherein the request specifies a location restriction thatprovides input for the cloud manger to determine a physical location fora preferred virtual machine based on physical location attributes of thepreferred virtual machine; and wherein the streams manager modifies theflow graph to move the under-performing operator of the streamingapplication to a preferred virtual machine based on the physicallocation attributes of the preferred virtual machine; wherein thestreams manager requests a cloud manager to provision at least onevirtual machine with logic to implement at least one of the plurality ofoperators, and the cloud manager determines physical locationsattributes of candidate virtual machines and determines the preferredvirtual machine from the candidate virtual machines based on thephysical location attributes, the cloud manager provisions the preferredvirtual machine, and the streams manager modifies the flow graph toinclude the preferred virtual machine in the flow graph of the streamingapplication; and wherein the location restriction indicates an operatorprocesses politically sensitive data that must be performed in aspecific political environment and instructs the cloud manager to selecta VM with a physical location attribute that meets the locationrestriction for the specific nature of the sensitive data processed bythe operator.
 2. An apparatus comprising: at least one processor; amemory coupled to the at least one processor; a streaming applicationresiding in the memory and executed by the at least one processor, thestreaming application comprising a flow graph that includes a pluralityof operators that process a plurality of data tuples; and a streamsmanager residing in the memory and executed by the at least oneprocessor, the streams manager monitoring performance of the streamingapplication; when the streams manager determines an under-performingoperator of the streaming application can be optimized, sending arequest to a cloud manager to provision at least one virtual machine;wherein the request specifies a location restriction that provides inputfor the cloud manger to determine a physical location for a preferredvirtual machine based on physical location attributes of the preferredvirtual machine, wherein the location restriction indicates an operatorprocesses politically sensitive data that must be performed in aspecific political environment and instructs the cloud manager to selecta VM with a physical location attribute that meets the locationrestriction for the specific nature of the sensitive data processed bythe operator, wherein the physical location attributes include asecurity attribute of the physical machine hosting the virtual machinethat indicates a high level of security for the physical locationhosting the virtual machine; and wherein the streams manager modifiesthe flow graph to move the under-performing operator of the streamingapplication to a preferred virtual machine based on the physicallocation attributes of the preferred virtual machine.
 3. Acomputer-readable article of manufacture comprising software stored on anon-transitory computer readable medium, the software comprising: astreams manager that monitors performance of a streaming application;when the streams manager determines an under-performing operator of thestreaming application can be optimized, the streams manager sends arequest to a cloud manager to provision at least one virtual machine,wherein the request specifies a location restriction that provides inputfor the cloud manger to determine a physical location for a preferredvirtual machine based on physical location attributes of the preferredvirtual machine; wherein the streams manager modifies a flow graph tomove the under-performing operator of the streaming application to apreferred virtual machine based on physical location attributes of thepreferred virtual machine; wherein the streams manager requests a cloudmanager to provision at least one virtual machine with logic toimplement at least one of the plurality of operators, and the cloudmanager determines physical locations attributes of candidate virtualmachines and determines the preferred virtual machine from the candidatevirtual machines based on the physical location attributes, the cloudmanager provisions the preferred virtual machine, and the streamsmanager modifies the flow graph to include the preferred virtual machinein the flow graph of the streaming application; and wherein the locationrestriction indicates an operator processes politically sensitive datathat must be performed in a specific political environment and instructsthe cloud manager to select a VM with a physical location attribute thatmeets the location restriction for the specific nature of the sensitivedata processed by the operator.